/**
 * 
 */
package sg.nus.iss.vmcs.models;

import sg.nus.iss.vmcs.VMCSException;
import sg.nus.iss.vmcs.utils.StoreType;

/**
 * @author Raj
 *
 */
public abstract class AbstractStoreFactory {
	private static AbstractStoreFactory cashStoreFactory = new CashStoreFactory();
	private static AbstractStoreFactory drinksStoreFactory = new DrinksStoreFactory();

	public static AbstractStoreFactory getStoreFactory(StoreType storeType){
		AbstractStoreFactory fac = null;
		switch(storeType){
			case CASH:
				fac = cashStoreFactory;
				break;
			
			case DRINKS:
				fac = drinksStoreFactory;
				break;
				
			default: 
				System.out.println("Invalid choice");	
				break;
		}
		
		return fac;
	}
	
	public abstract Store getStore();
	/**
	 * Abstract method to make the StoreItem Object 
	 * @param ob
	 * @param qty
	 * @return
	 * @throws VMCSException 
	 */
	public abstract StoreItem makeStoreItem(StoreObject storeObject, int quantity) throws VMCSException;
	public abstract StoreObject makeStoreObject();

}
